/**
 * 项目示例-列表表头
 * Date 2023-5-25 09:33:56
 * 可选参数可参考：https://element-plus.org/zh-CN/component/table.html#table-column-属性
 */

import type { TableColumnCtx } from 'element-plus'
interface ExampleListItem {
  project: string;
  name: string;
  startTime: string;
  endTime: string;
  user: string;
  updateTime: string;
  state: string;
  process: string;
}

export const exampleColumns = [
  { type: 'selection', width: 60 },
  { type: 'index', label: '序号', width: 60, align: 'center' },
  { prop: 'project', label: '巡查项目', minWidth: 130, align: 'center' },
  { prop: 'name', label: '计划名称', minWidth: 200, align: 'center' },
  { prop: 'startTime', label: '生效日期', minWidth: 120, sortable: true, align: 'center' },
  { prop: 'endTime', label: '截止日期', minWidth: 120, sortable: true, align: 'center' },
  {
    prop: 'user',
    label: '创建人',
    align: 'center',
    formatter: function (row:ExampleListItem, column:TableColumnCtx<ExampleListItem>, cellValue:string) {
      console.log(row, column, cellValue, '111111')
      return cellValue + '111'
    }
  },
  { prop: 'updateTime', label: '更新时间', sortable: true, minWidth: 180, align: 'center' },
  { prop: 'state', label: '计划状态', minWidth: 120, sortable: true, align: 'center' },
  { prop: 'process', label: '计划进度', minWidth: 150, align: 'center' },
  { prop: 'action', label: '操作', fixed: 'right', width: 210, align: 'center' }
]
